import type {FormRules} from 'element-plus'

// 登录页校验规则
export const loginRules: FormRules = {
  username: [
    {required: true, message: '用户名不能为空', trigger: 'blur'},
    {min: 5, max: 8, message: '用户名5-8位', trigger: 'blur'}
  ],
  password: [
    {required: true, message: '密码不能为空', trigger: 'blur'},
    {min: 5, max: 8, message: '密码5-8位', trigger: 'blur'}
  ],
  email: [{required: true, message: '邮箱不能为空', trigger: 'blur'}],
  code: [
    {required: true, message: '验证码不能为空', trigger: 'blur'},
    {len: 4, message: '验证码为4位', trigger: 'blur'}
  ]
}